/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package apus.action;

import apus.entity.User;
import apus.persistence.UserDAO;
import apus.services.ServiceLocator;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author 21vek
 */
public class AdministrationAction implements Action{

    @Override
    public String getName() {
        return "administration";
    }

    @Override
    public ActionResult execute(HttpServletRequest request, HttpServletResponse response) {
        List <User> employeeList = ServiceLocator.getService(UserDAO.class).findAllPersonal();
        request.setAttribute("employeeList", employeeList);
        return ActionResult.forward("/WEB-INF/View/AdminView/AdministrationMainView.jsp");
    }
    
}
